Release 10.1A: OpenEdge Development:
Messaging and ESB


Creating a Message Consumer object

The 4GL application uses a Message Consumer object to receive messages from a destination or to receive asynchronous error messages. In a Session object, the application creates a Message Consumer object using the createMessageConsumer procedure.

The life cycle of a Message Consumer object includes these general steps:

  1. An application implements a procedure to handle the messages.
  2. The application creates the Message Consumer, specifying the message-handling procedure.
  3. The application uses the Message Consumer object to do one of the following: subscribe to a topic (Pub/Sub) or receive messages from the queue (PTP); set an error handler and receive error messages asynchronously from SonicMQ through the OpenEdge Adapter for SonicMQ; or receive replies in a request/reply cycle.
  4. After using the Message Consumer object, the application can activate it by getting into a WAIT FOR state (or any IO-blocking state where the application processes events).
  5. When the Message Consumer finishes processing all messages of interest, the application calls the deleteConsumer procedure to release the resources in the 4GL application, the OpenEdge Adapter for SonicMQ, and the SonicMQ Broker.

Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095